<?php

class myUser extends sfGuardSecurityUser {
    
    public function ajouterContactAHistorique(Contact $contact) {
        $ids = $this->getAttribute('historique', array());

        if (!in_array($contact->getId(), $ids)) {
            array_unshift($ids, $contact->getId());

            $this->setAttribute('historique', array_slice($ids, 0, 10));
        }
    }
}
